﻿#region 命名空间

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using WinnerCMS.BLL;

#endregion

namespace WinnerCMS.WebUI.Admin.Model
{
    /// <summary>
    ///     DataHandler 的摘要说明
    /// </summary>
    public class DataHandler : IHttpHandler
    {
        public void ProcessRequest(HttpContext context)
        {
            context.Response.Expires = 0;
            context.Response.CacheControl = "no-cache";
            context.Response.ContentType = "text/plain";

            var action = context.Request["Action"];
            switch (action)
            {
                case "DBTableCount":
                    context.Response.Write(new ModelManage().GetDBTableCount(context.Request["TableName"]));
                    break;
            }
        }

        public bool IsReusable
        {
            get { return false; }
        }
    }
}